import { h, init } from 'snabbdom';

let patch = init([]);
let app = document.querySelector("#app");

let vnode = h("div#container.cls", "hello");

// 把真实dom转虚拟dom 并对比 进行渲染
let oldVnode = patch(app, vnode);

vnode = h("div", "good good study");

// 比较虚拟dom 差异 渲染页面
patch(oldVnode, vnode );
